import { defineStore } from "pinia";

export const usepasswordStore = defineStore('usepasswordStore',{
 
  state: () => {
    return{
       userId:'',
       password:''
    }
    
  },
  getters:{
    getUserId(state){
        return state.userId
    },
    getPassword(state) {
        return state.password
    }
  },
  actions: {
    setUserId(userId:string) {
      this.userId = userId;
    },
    setPassword(password:string) {
        this.password = password;
    },
  },
    persist: {
        enabled: true,
        strategies: [
            { storage: localStorage, paths: ['userId','password'] }
        ]
    }
});